package com.trela.paymeontime.web.model;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;

import org.joda.time.DateTime;

import lombok.AllArgsConstructor;
import lombok.Data;

@AllArgsConstructor
@Data
public class Asset {
    BigDecimal balance;
    String name;
    int interestRate;
    BigDecimal limit;
    AssetType assetType;
    DateTime dueDateTime;

    public static enum AssetType {
        CASH, BANK_ACCOUNT, CREDIT_CARD, LOAN;
        public static final Set<Asset.AssetType> POSITIVE_ASSETS = Collections.unmodifiableSet(new HashSet<>(Arrays
                .asList(Asset.AssetType.CASH, Asset.AssetType.BANK_ACCOUNT)));
        public static final Set<Asset.AssetType> NEGATIVE_ASSETS = Collections.unmodifiableSet(new HashSet<>(Arrays
                .asList(Asset.AssetType.LOAN, Asset.AssetType.CREDIT_CARD)));

    }
}
